package com.shop.shoporder.service;

import com.shop.shoporder.entity.GroupbuyGood;
import com.shop.shoporder.entity.GroupbuyGoodInfo;



import java.util.List;

public interface GroupbuyGoodService {
    int deleteByPrimaryKey(int groupbuygoodId);

    int insert(GroupbuyGood record);

    int insertSelective(GroupbuyGood record);

    GroupbuyGood selectByPrimaryKey(int groupbuygoodId);

    int updateByPrimaryKeySelective(GroupbuyGood record);

    int updateByPrimaryKey(GroupbuyGood record);

    List<GroupbuyGoodInfo> getGroupbuyGooods();

    //获取团购商品
    GroupbuyGood getGroupbuyGood(int groupbuygoodId);

    //根据一级分类ID查询团购产品
    List<GroupbuyGoodInfo> getGroupbuyGoodByClassfyId(int classfyId);


    //根据产品ID和规格ID查询团购产品
    GroupbuyGood getGroupbuyGoodByGoodIdAndSpecId(int goodId,int specId);


    /**
     * 查询团购产品
     * @param goodId
     * @param specId
     * @return
     */
    GroupbuyGoodInfo getGoodInfoByGoodIdAndSpecId( int goodId,  int specId);

    /**
     * 根据商品ID查询所有的团购产品的规格
     * @param goodId
     * @return
     */
    List<GroupbuyGood> getGroupbuyGoodListByGoodId(int goodId);


 
}
